﻿using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;

namespace ExperimentActivity
{
    public partial class ExperimentActivity : SequenceActivity
    {
        public ExperimentActivity()
        {
            InitializeComponent();
        }

        public static DependencyProperty INPUTProperty = DependencyProperty.Register("INPUT", typeof(string), typeof(ExperimentActivity));
        public static DependencyProperty OUTPUTProperty = DependencyProperty.Register("OUTPUT", typeof(string), typeof(ExperimentActivity));

        [Category("INPUT PARAMS")]
        [Browsable(true)]
        public string INPUT
        {
            get
            {
                return ((string)(base.GetValue(ExperimentActivity.INPUTProperty)));
            }
            set
            {
                base.SetValue(ExperimentActivity.INPUTProperty, value);
            }
        }

        [Category("OUTPUT PARAMS")]
        [Browsable(true)]
        public string OUTPUT
        {
            get
            {
                return ((string)(base.GetValue(ExperimentActivity.OUTPUTProperty)));
            }
            set
            {
                base.SetValue(ExperimentActivity.OUTPUTProperty, value);
            }
        }

        private void codeActivity1_ExecuteCode(object sender, EventArgs e)
        {
            Console.WriteLine("Inside my activity");
            Console.WriteLine("INPUT = {0}", INPUT);
            OUTPUT = "MY THE MOST LOVELY IN THE WORLD WORKFLOW, DIE!!! DIE!!! DIE!!!";
        }
    }
}
